{include file="public/meat" title="添加/编辑表单模型"/}
<div class="cx-fex-c">
    <div class="x11 pad-t15 pad-b10">
        <div class="cx-fex-c">
            <div class="layout">
                <a href="{:url('index')}" class="button bg-blue">返回表单模型列表</a>
                {if $btn.add}
                <a href="{:url('add')}" class="button bg-blue">添加表单模型</a>
                {/if}
            </div>
        </div>
    </div>
    <div class="x11">
        <fieldset class="cx-field">
            <legend class="cx-field-legend">添加/编辑表单模型</legend>
        <form class="layui-form" role="form" action="" method="post">
            <div class="cx-fex-l mb-10">
                <div class="x3 t-r">
                    <label class="lab">表单名称（<span class="t-red">必填</span> ）</label>
                </div>
                <div class="xs8 xl9">
                    <input type="text" name="title" placeholder="请输入表单名称" class="ipt" required lay-verify="required" value="{$postdb.title|default=''}">
                </div>
            </div>
            <div class="cx-fex-l mb-10">
                <div class="x3 t-r">
                    <label class="lab">允许发表</label>
                </div>
                <div class="xs8 xl9">
                    {volist name="grouplist" id="cx"}
                    <input type="checkbox" name="postgroup[]" {in name="$cx.id" value="$postdb.postgroup|default=''"}checked{/in} value="{$cx.id}" title="{$cx.title}">
                    {/volist}
                </div>
            </div>
            <div class="cx-fex-l mb-10">
                <div class="x3 t-r">
                    <label class="lab">允许浏览</label>
                </div>
                <div class="xs8 xl9">
                    {volist name="grouplist" id="cx"}
                    <input type="checkbox" name="seegroup[]" {in name="$cx.id" value="$postdb.seegroup|default=''"}checked{/in} value="{$cx.id}" title="{$cx.title}">
                    {/volist}
                </div>
            </div>
            <div class="cx-fex-l mb-10">
                <div class="x3 t-r">
                    <label class="lab">是否允许游客填写（<span class="t-red">必选</span> ）</label>
                </div>
                <div class="xs8 xl9">
                    <input name="tourist" required type="radio" value="1" {eq name="$postdb.status|default='1'" value="1"}checked="checked"{/eq} title="允许">
                    <input name="tourist" required type="radio" value="0" {eq name="$postdb.status|default=''" value="0"}checked="checked"{/eq} title="不允许">
                </div>
            </div>
            <div class="cx-fex-l mb-10">
                <div class="x3 t-r">
                    <label class="lab">是否启用（<span class="t-red">必选</span> ）</label>
                </div>
                <div class="xs8 xl9">
                    <input name="status" required type="radio" value="1" {eq name="$postdb.status|default='1'" value="1"}checked="checked"{/eq} title="启用">
                    <input name="status" required type="radio" value="0" {eq name="$postdb.status|default=''" value="0"}checked="checked"{/eq} title="禁用">
                </div>
            </div>
            <div class="cx-fex-l mb-10">
                <div class="x3 t-r">
                    <label class="lab">排序（<span class="t-red">必填</span> ）</label>
                </div>
                <div class="xs8 xl9">
                    <input type="text" name="sort" placeholder="请输入排序值" class="ipt" required lay-verify="required|number" value="{$postdb.sort|default='0'}">
                </div>
            </div>
            <div class="cx-fex-l mb-10">
                <div class="x3 t-r">
                    <label class="lab"></label>
                </div>
                <div class="xs8 xl9">
                    <input type="hidden" name="id" value="{$postdb.id|default=''}">
                    <input type="hidden" name="__token__" required lay-verify="required" value="{$Request.token}" />
                    <button class="button bg-blue" lay-submit lay-filter="*">立即提交</button>
                </div>
            </div>
        </form>
        </fieldset>
    </div>
</div>
<div style="height: 20px; overflow: hidden"></div>
{include file="public/js" /}
<script>
    layui.config({
        base: '__ADMIN__/js/'
    }).use('app');
</script>
{include file="public/footer" /}